package com.example.javabasic.thread.classtwo.singleton.demo3;

/**
 * 观察者抽象类,
 */
public abstract class Observer {

    protected Subject subject;

    public Observer(Subject subject){
        this.subject = subject;
        this.subject.attach(this);
    }

    //通知观察者
    public abstract void notifySubject();



}
